package sqlserver;

import java.sql.Connection;

import org.firefly.db.util.DBInfo;
import org.firefly.db.util.DBName;
import org.firefly.db.util.DBUtils;

public class RDProductServer {
    public static void main(String[] args) throws Exception {
        Class.forName("net.sourceforge.jtds.jdbc.Driver");
        Class.forName("oracle.jdbc.driver.OracleDriver");
        Connection srcConn = java.sql.DriverManager
                .getConnection("jdbc:jtds:sqlserver://172.16.1.5:1433/RDSYSEDUV8", "sa", "Ep123!@#");
        Connection tarConn = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@172.16.1.3:1521:ORCL",
                "RDSYSEDUV805", "eplugger");
        try {
            DBInfo srcInfo = new DBInfo(srcConn, null, DBName.SqlServer2005);
            DBInfo tarInfo = new DBInfo(tarConn, "RDSYSEDUV805", DBName.Oracle);
            DBUtils.dbConvertA2B(srcInfo, tarInfo, true);
        } finally {
            srcConn.close();
            tarConn.close();
        }
    }
}
